package com.sky.controller.user;

import com.sky.entity.ShopStatus;
import com.sky.result.Result;
import com.sky.service.ShopStatusService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 符健清
 * @version 1.0
 * 店家 状态 控制器
 */
@SuppressWarnings({"all"})
@Api (tags = "用户端查询商家状态接口")
@RestController("UserController")
@Slf4j
public class ShopController {
    @Autowired
    private ShopStatusService shopStatusService;
    @ApiOperation("查询商家状态")
    @GetMapping("/user/shop/status")
    public Result   shopStatus() {
         List<ShopStatus> list=shopStatusService.selectShopStatus();
        ShopStatus shopStatus=list.get(0);
        Result result = new Result();
        return result.success(shopStatus.getStatus());
    }
}
